package cn.lu.dao;

import cn.lu.pojo.Chapter;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ChapterMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Chapter record);

    int insertSelective(Chapter record);

    Chapter selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Chapter record);

    int updateByPrimaryKey(Chapter record);

    List<Chapter> selectByCurriculumId(Integer curriculumId);

    int deleteById(Integer chapterId);

    int deleteByIdAndUserId(@Param(value = "chapterId") Integer chapterId, @Param(value = "userId") Integer userId);

    int updateByIdAndUserId(@Param(value = "chapter") Chapter chapter, @Param(value = "userId") Integer userId);

    int chapterWhetherTeacher(@Param(value = "chapterId") Integer chapterId, @Param(value = "userId") Integer userId);

}